{% extends "zinnia/skeleton.html" %}
{% load zinnia_tags i18n %}
{% load url from future %}

{% block meta %}
    <meta name="generator" content="Zinnia {{ ZINNIA_VERSION }}" />
{% endblock %}

{% block link %}
    <link rel="index" href="{% url 'zinnia_entry_archive_index' %}" />
    <link rel="author" type="text/plain" href="{% url 'zinnia_humans' %}" />
    <link rel="EditURI" type="application/rsd+xml" href="{% url 'zinnia_rsd' %}" />
    <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="{% url 'zinnia_wlwmanifest' %}" />
    <link rel="search" type="application/opensearchdescription+xml" title="Zinnia's Blog" href="{% url 'zinnia_opensearch' %}" />
    <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of latest entries" %}" href="{% url 'zinnia_entry_latest_feed' %}" />
    <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of latest discussions" %}" href="{% url 'zinnia_discussion_latest_feed' %}" />
    {% get_archives_entries "zinnia/tags/archives_entries_link.html" %}
{% endblock %}

{% block breadcrumbs %}
  {% zinnia_breadcrumbs %}
{% endblock %}

{% block sidebar %}
<div id="widget-search" class="widget">
  <h3>{% trans "Search" %}</h3>
  {% include "zinnia/tags/search_form.html" %}
</div>
<div id="widget-categories" class="widget">
  <h3>{% trans "Categories" %}</h3>
  {% get_categories %}
</div>
<div id="widget-authors" class="widget">
  <h3>{% trans "Authors" %}</h3>
  {% get_authors %}
</div>
<div id="widget-calendar" class="widget">
  <h3>{% trans "Calendar" %}</h3>
  {% get_calendar_entries %}
</div>
<div id="widget-tags" class="widget">
  <h3>{% trans "Tags" %}</h3>
  {% get_tag_cloud %}
</div>
<div id="widget-recents" class="widget">
  <h3>{% trans "Recent entries" %}</h3>
  {% get_recent_entries %}
</div>
<div id="widget-comments" class="widget">
  <h3>{% trans "Recent comments" %}</h3>
  {% get_recent_comments %}
</div>
<div id="widget-linkbacks" class="widget">
  <h3>{% trans "Recent linkbacks" %}</h3>
  {% get_recent_linkbacks %}
</div>
<div id="widget-randoms" class="widget">
  <h3>{% trans "Random entries" %}</h3>
  {% get_random_entries %}
</div>
<div id="widget-populars" class="widget">
  <h3>{% trans "Popular entries" %}</h3>
  {% get_popular_entries %}
</div>
<div id="widget-archives" class="widget">
  <h3>{% trans "Archives" %}</h3>
  {% get_archives_entries_tree %}
</div>
{% if user.is_authenticated %}
<div id="widget-tools" class="widget">
  <h3>{% trans "Tools" %}</h3>
  <ul>
    {% if perms.zinnia %}
    <li>
      <a href="{% url 'admin:app_list' 'zinnia' %}" title="{% trans "Dashboard" %}">
        {% trans "Dashboard" %}
      </a>
    </li>
    {% endif %}
    {% if perms.zinnia.add_entry %}
    <li>
      <a href="{% url 'admin:zinnia_entry_add' %}" title="{% trans "Post an entry" %}">
        {% trans "Post an entry" %}
      </a>
    </li>
    {% endif %}
    {% block admin_tools %}
    {% endblock %}
    <li>
      <a href="{% url 'admin:logout' %}" title="{% trans "Log out" %}">
        {% trans "Log out" %}
      </a>
    </li>
  </ul>
</div>
{% endif %}
{% endblock %}
